<#import "/spring.ftl" as spring/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>审核列表</title>
    <link rel="stylesheet" type="text/css" href="<@spring.url "/semantic/semantic.css" />">
    <link rel="stylesheet" type="text/css"
          href="<@spring.url '/css/jquery/jquery-ui-1.8.23.custom.css' />" media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/ztree/zTreeStyle.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/form/jquery.mrd.form.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css"
          href="<@spring.url '/css/jquery/jquery-ui-timepicker-addon.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css"
          href="<@spring.url '/css/validata/validationEngine.jquery.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css"
          href="<@spring.url '/css/layout/layout-default-latest.css'  />" media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/jqgrid/ui.jqgrid.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/jw/jw.css'  />" media="screen"/>
    <link rel="stylesheet" type="text/css"
          href="<@spring.url '/css/multiselect/jquery.multiselect.css'  />"
          media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/main.css'  />" media="screen"/>
    <link rel="stylesheet" type="text/css" href="<@spring.url '/css/global.css'  />"
          media="screen"/>

    <script type="text/javascript" src="<@spring.url '/js/jquery/jquery-1.8.0.min.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/jquery/jquery-ui-1.8.23.custom.min.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/jquery/i18n/jquery.ui.datepicker-zh-CN.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/jquery/i18n/jquery-ui-timepicker-addon.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/ztree/jquery.ztree.all-3.4.min.js'  />"></script>
    <script type="text/javascript" src="<@spring.url '/js/form/jquery.form.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/validata/jquery.validationEngine-zh_CN.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/validata/jquery.validationEngine.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/layout/jquery.layout-latest.min.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/jqgrid/i18n/grid.locale-cn.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/jqgrid/jquery.jqGrid.min.js'  />"></script>
    <script type="text/javascript" src="<@spring.url '/js/jw/jw.js'  />"></script>
    <script type="text/javascript" src="<@spring.url '/js/form/jquery.mrd.form.js'  />"></script>
    <script type="text/javascript" src="<@spring.url '/js/util.js'  />"></script>
    <script type="text/javascript"
            src="<@spring.url '/js/multiselect/jquery.multiselect.js'  />"></script>
    <script type="text/javascript" src="<@spring.url '/js/global.js'  />"></script>
</head>
<body>
<#--<div class="main ui container">-->
<div id="companyQpTempData"></div>
<#--</div>-->
<script type="text/javascript">
    var formSetting = {
        title: "查询待审核信息",
        module: 'query',
        columns: [{
            index: "companyCode",
            name: "companyCode",
            label: "单位编号"
        }, {
            index: "companyCoUnite",
            name: "companyCoUnite",
            label: "18位社会统一代码"
        }, {
            index: "companyName",
            name: "companyName",
            label: "单位名称"
        }, {
            index: "submitTime",
            name: "submitTime",
            label: "提交时间从",
            type: "date",
            op: "ge"
        }, {
            index: "submitTime",
            name: "submitTime",
            label: "到",
            type: "date",
            op: "le"
        }],
        grid: {
            id: "waitAuditCompanyQpTempList",
            title: "查询结果",
            multiselect: true,
            url: "j_list_cqpTemp?closed=0",
            colModel: [{
                name: "id",
                label: "id",
                hidden: true
            }, {
                name: "companyCode",
                align: 'center',
                label: "单位编号"
            }, {
                name: "companyCoUnite",
                align: 'center',
                label: "18位社会统一代码"
            }, {
                name: "companyName",
                align: 'center',
                label: "单位名称"
            }, {
                name: "submitor.name",
                align: 'center',
                label: "提交人"
            }, {
                name: "submitor.belongCompanyName",
                sortable: false,
                align: 'center',
                label: "实际委托人"
            }, {
                index: "submitTime",
                name: "submitTime",
                align: 'center',
                label: "提交时间",
                formatter: 'date',
                formatoptions: {srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'}
            }],
            ondblClickRow: function () {

            }
        }
    }
    $(function () {
        $("#companyQpTempData").mrdForm(formSetting);
        addGridBtn();
    });
    function addGridBtn() {
        var companyQpGrid = $("#waitAuditCompanyQpTempList");
        companyQpGrid.jqGrid('navGrid', '#pager',
                             {edit: false, add: false, del: false, search: false});
        companyQpGrid.jqGrid('navButtonAdd', '#pager', {
            caption: "去审核（已选行）",
            buttonicon: "ui-icon-shuffle",
            onClickButton: function () {
                var gsr = companyQpGrid.jqGrid('getGridParam', 'selarrrow');
                var ids = "";
                if (gsr.length > 0) {
                    for (var i = 0; i < gsr.length; i++) {
                        ids += gsr[i];
                        ids += ",";
                    }
                    ids = ids.substring(0, ids.length - 1);
                } else {
                    alert("Please select Row")
                }
                location.href = "toAuditCompanyQpTempDetail?ids=" + ids;
            }
        });
    }
</script>
</body>
</html>